# Contributor: Eloi Torrents <eloitor@disroot.org>
# Maintainer: Eloi Torrents <eloitor@disroot.org>
pkgname=itd
pkgver=1.1.0
pkgrel=8
pkgdesc="Daemon that interfaces with InfiniTime firmware on the PineTime smartwatch"
url="https://gitea.elara.ws/Elara6331/itd"
# loongarch64 build failed
arch="all !loongarch64"
license="GPL-3.0-only"
depends="bluez dbus"
makedepends="go"
source="$pkgname-v$pkgver.tar.gz::https://gitea.elara.ws/Elara6331/itd/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname"

prepare() {
	default_prepare

	echo -n $pkgver > version.txt
}

build() {
	make all -o version.txt
}

package() {
	make DESTDIR="$pkgdir" PREFIX=/usr install
	# just a systemd service
	rm -r "$pkgdir"/usr/lib
}

sha512sums="
5fbaedf936c316defd5486d53ea20daefdfda05932f950a5885149cf2656fd753becd9a98e926b15ce25358906524a40661076d4a922136c1a91b0764ac3e13a  itd-v1.1.0.tar.gz
"
